<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<button v-on:click="set">点我</button>
			<button v-on:click="reset">重置</button>
			<P>这个按钮被点击了{{counter}}次</P>
		</div>
		<script src="https://unpkg.com/vue/dist/vue.js"></script>
		<script>
			var app=new Vue({
				el:'#app',
				data:{
					counter:0
				},
				methods:{
					set:function(){
						console.log(event.target)
						console.log(event)
						console.log(this)
						this.counter++;		
					},
					reset:function(){
						this.counter='';
					}
				}
			})
		</script>
	</body>
</html>

